package com.example.xmltohtml.html;

import org.apache.commons.io.FilenameUtils;

public class PdfHtml {

  public void createHtml(String inputFile, String outputFile) throws Exception {
    String baseName = FilenameUtils.getBaseName(inputFile);
    int size = ImageUtils.convertPdf2Png(inputFile, outputFile);
    FileHelper.writeHtmlFile(size, outputFile, baseName);
  }

  public static void main(String[] args) {
    try {
      PdfHtml pdfHtml = new PdfHtml();
      pdfHtml.createHtml("M:\\java\\pdftohtml\\H2_AN202505081669303055_1.pdf",
          "M:\\java\\pdftohtml\\H2_AN202505081669303055_1");
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}

